<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="lib/nprogress/nprogress.css">
    <!--bootstrap-->
    <link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css">
    <!--表单验证插件的css-->
    <link rel="stylesheet" href="lib/bootstrap-validator/css/bootstrapValidator.min.css">
    <!--自已写的css-->
    <link rel="stylesheet" href="./css/common.css">
    <link rel="stylesheet" href="./css/category.css">
    
    <script src="lib/jquery/jquery.min.js"></script>
    <!--模板引擎-->
    <script src="lib/artTemplate/template-web.js"></script>
    <!--bootstrap-->
    <script src="lib/bootstrap/js/bootstrap.js"></script>
    <!--分页器-->
    <script src="lib/bootstrap-paginator/bootstrap-paginator.min.js"></script>
    <!--表单验证插件-->
    <script src="lib/bootstrap-validator/js/bootstrapValidator.min.js"></script>
    <!--图表插件-->
    <script src="lib/echarts/echarts.min.js"></script>
    <!--上传文件的插件-->
    <script src="lib/jquery-fileupload/jquery.ui.widget.js"></script>
    <script src="lib/jquery-fileupload/jquery.fileupload.js"></script>
    <script src="lib/jquery-fileupload/jquery.iframe-transport.js"></script>
    <!--进度条插件-->
    <script src="lib/nprogress/nprogress.js"></script>
    <!--自已写的js-->
    <script src="./js/commom.js"></script>
    <script  src="./js/category.js"></script>
    

</head>
<body>
    <div class="main">
        <div class="left">
            <div class="title">ITCAST</div>
            <div class="icon">
                <img src="./images/default.png" alt="">
                <p>超级管理员</p>
            </div>
            <ul class="menu">
                <li>
                    <a href="./user.html"><span class="glyphicon glyphicon-user"></span>用户管理</a>
                </li>
                <li>
                    <a href="javascript:void()" class="toggleMenu"><span class="glyphicon glyphicon-list"></span>分类管理</a>
                    <div class="submenu">
                        <a  class="active"  href="./category.html">一级分类</a>
                        <a href="./subcategory.html">二级分类</a>
                    </div>
                </li>
                <li>
                    <a href="./product.html"><span class="glyphicon glyphicon-tags"></span>商品管理</a>
                </li>                                
            </ul>
        </div>
        <div class="right">
            <div class="topBar">
                <span class="glyphicon glyphicon-align-justify pull-left"></span>
                <span class="glyphicon glyphicon-log-out pull-right"></span>
            </div>
            <ol class="breadcrumb">
                <li><a href="#">管理系统</a></li>
                <li><a href="#">一级分类</a></li>
            </ol>
            <div class="content charts container-fluid">
                <button class="addcategory btn btn-default">添加分类</button>
                <table class="table table-hover table-bordered">
                    <thead>
                        <tr>
                            <th>序号</th>
                            <th>分类名称</th>
                        </tr>
                    </thead>
                    <tbody>
                        
                    </tbody>
                </table>
                <div class="pull-right">
                    <ul class="pagination"></ul>
                </div>
            </div>
        </div>
    </div>
    <!-- 分类模板引擎 -->
    <script id='category' type="text/html">
        {{each rows}}
            <tr>
                <td>{{(page-1)*size+$index+1}}</td>
                <td>{{$value.categoryName}}</td>
            </tr>
        {{/each}}
    </script>
    
    <!-- 添加分类的模态框 -->
    <div id="addcategory-modal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">添加分类</h4>
                </div>
                <div class="modal-body">
                    <form>
                        <div class="form-group">
                            <input name='categoryName' type="text" class="form-control" placeholder="请输入分类名">
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-primary">确定</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->

<!-- 退出登陆的模态框 -->
    <div id="logout-modal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">温馨提示</h4>
                </div>
                <div class="modal-body">
                    <p><span class="glyphicon glyphicon-info-sign"></span>您确定要退出后台管理系统吗？</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary">确定</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->
</body>
</html>

